package com.game.screen;

import processing.core.PImage;

import com.game.util.Color;
import com.game.util.Coord;
import com.game.util.ProcessingObject;

public class Sprite extends ProcessingObject {
	
	protected float speed;
	protected PImage pimg;
	protected int width;
	protected int height;
	protected float x;
	protected float y;

	public Sprite() {
		super();
	}
	
	public Sprite(String img) {
		super();
		pimg = pApplet.loadImage(img);
	}
	
	public PImage getImage() {
		return pimg;
	}
	
	public Sprite(String img, int x, int y) {
		super();		
		pimg = pApplet.loadImage(img);
		position = new Coord(x, y);
	}
	
	public float getX() {
		return position.getX();
	}
	public void setX() {
		this.x=position.getX();
	}

	public float getY() {
		return position.getY();
	}
	public void setY() {
		this.y=position.getY();
	}

	public int getWidth() {
		return pimg.width;
	}
	public void setWidth() {
		this.width=pimg.width;
	}
	
	public int getHeight() {
		return pimg.height;
	}
	public void setHeight() {
		this.height=pimg.height;
	}
	
	public void display()  {
		pApplet.image(pimg, position.getX(), position.getY());
	}

}
